package com.project.mapper;

import com.project.bean.ProvinceBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface IProvinceMapper {
    /**
     * 按id查找省份，同时查找省份的城市集合
     * @param id 省份id
     * @return 省份对象
     */
    ProvinceBean findById(int id);

    @Select("select * from t_province")
    @ResultMap("provinceMap")
    List<ProvinceBean> findAll();
}
